package com.mc.algorithm;

public class FourtySeven {
	public static int add(int a, int b){
		
		int sum = a;
		int carry = b;
		
		while(carry!=0){
			int temp = sum^carry;
			carry = (sum&carry)<<1;
			sum = temp;
		}
		return sum;
	}
	public static void main(String[] args) {
		int res = FourtySeven.add(5, 6);
		System.out.println(res);
	}
}
